package com.shopAuth.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import com.shopAuth.bean.CheckAuth;

@Mapper
public interface CheckAuthMapper {
	
	@Select("select * from sys_checkAuth where tel=#{tel} order by createDate desc limit 0,1")
	public CheckAuth getFrist(CheckAuth checkAuth);
	
	@Insert("insert into sys_checkAuth set tel=#{tel},createDate=#{createDate},checkCode=#{checkCode},`use`=#{use}")
	public int insert(CheckAuth checkAuth);
	
	@Update("update sys_checkAuth set `use`=#{use} where checkCode=#{checkCode} and tel=#{tel}")
	public int update(CheckAuth checkAuth);
	
}
